package com.woniu.immunologicalmechanism.mapper;

import com.woniu.common.entity.ImmuneRegister;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface ImmuneRegisterMapper {
    //添加免疫登记
    @Insert("insert into immune_register values(null,#{immune_num},#{type},#{vaccine_number},#{immune_date},#{immune_info},#{precent_photo},#{oid})")
    void insertimmuneRegister(ImmuneRegister immuneRegister);
    //修改免疫登记信息
    @Update("update immune_register set immune_num=#{immune_num},type=#{type},vaccine_number=#{vaccine_number},immune_date=#{immune_date},immune_info=#{immune_info},precent_photo=#{precent_photo} where oid=#{oid}")
    void updateimmuneRegister(ImmuneRegister immuneRegister);
    //根据免疫登记id查询免疫登记详情
    @Select("select * from immune_register where id=#{iid}")
    ImmuneRegister selectimmuneRegister(int iid);
    //根据免疫证编号查询
    @Select("select * from immune_register where immune_num=#{number}")
    ImmuneRegister getimmuneRegisterExists(String number);
    //根据核验信息id查询免疫登记详情
    @Select("select * from immune_register where oid=#{oid}")
    ImmuneRegister selectimmuneRegisterByOid(int oid);



}
